<?php
namespace app\common\validate;

use think\Validate;

class CashValidate extends Validate
{
    protected $rule =   [
        'page|页数'              => 'require|integer',
        'limit|条数'             => 'require|integer',
        'user_id|用户ID'         => 'require|integer',
        'id|提现ID'              => 'require|integer',
        'wx_account|微信收款账号' => 'require|length:1,100',
        'number|数量'             => 'require|gt:0',
        'back_msg|驳回理由'       => 'require|length:1,100',
    ];
    
    protected $scene = [
        /** api */
        'add'       => ['user_id', 'wx_account', 'number'],

        /** admin */
        'list'      => ['page', 'limit'],
        'show'      => ['id'],
        'back'      => ['id', 'back_msg'],
    ];
}